<?php

namespace addons\travel\validate;

use think\Validate;

class Order extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'type' => 'require',
        'goods_id' => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '缺少参数',
        // 创建订单
        'type.require' => '请确定订单类型',
        'goods_id.require' => '请选择商品',
    ];

    /**
     * 字段描述
     */
    protected $field = [
        
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'cancel' => ['id'],
        'delete' => ['id'],
        'confirm' => ['id'],
        'pre' => ['type','goods_id'],
        'createOrder' => ['type','goods_id'],
    ];

}
